/*
 * Copyright (c) 2015 SeNDA
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
#ifndef INFO_H_
#define INFO_H_

#include <string>
#include <map>

class CInfo {
 private:
  float CPU;
  float MEM;
  std::string name;
  std::string user;
  std::map<int, float> cpuV;
  std::map<int, float> memV;

 public:
  CInfo();
  ~CInfo();
  CInfo(float, float, std::string, std::string);
  float getCPU() {
    return CPU / cpuV.size();
  }
  void setCPU(float nCPU) {
    CPU = nCPU;
  }
  float getMEM() {
    return MEM / memV.size();
  }
  void setMEM(float nMEM) {
    MEM = nMEM;
  }
  std::string getName() {
    return name;
  }
  void setName(std::string nName) {
    name = nName;
  }
  std::string getUser() {
    return user;
  }
  void setUser(std::string nUser) {
    user = nUser;
  }
  float getCPUat(int time);
  float getMEMat(int time);

  void addCPU(int, float);
  void addMEM(int, float);
};

#endif  // INFO_H_
